package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

/**
 *
 */
public class QuJiHuaUtil {


    //社保
    public static Integer getshebao(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return 1;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb002.getValue(), shebao)) {
            return 2;
        }
        return 3;
    }


    //公积金
    public static Integer getGjj(String gongjijin) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gongjijin)) {
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj002.getValue(), gongjijin)) {
            return 2;
        }
        return 3;
    }


    //车产
    public static Integer getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return 1;
        }
        return 2;
    }

    //预期
    public static Integer getyuqi(String yuqi) {
        if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq001.getValue(), yuqi)) {
            return 2;
        }else if(StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq003.getValue(), yuqi)){
            return 4;
        }
        return 5;
    }

    //保险
    public static Integer getbaoxian(String baoxian) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baoxian)) {
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx002.getValue(), baoxian)) {
            return 2;
        }
        return 1;
    }

    //学历
    public static Integer getXueLi(String xueli) {
        if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl002.getValue(), xueli)) {
            return 2;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl003.getValue(), xueli)) {
            return 3;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl004.getValue(), xueli)) {
            return 4;
        }else if(StrUtil.equals(BaseTypeInfoEnum.XueLi.xl005.getValue(),xueli)){
            return 5;
        }
        return 1;
    }


    //收入
    public static Integer getshouru(String shouru) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr001.getValue(), shouru)) {
            return 2;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr002.getValue(), shouru)) {
            return 3;
        }
        return 4;
    }

    //房产
    public static Integer getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return 1;
        }
        return 2;
    }



    //贷款金额
    public static Integer getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return 5;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return 10;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loan)) {
            return 20;
        }
        return 1;
    }

    //贷款时间
    public static Integer getLoanTerm(String loanTime) {
        if (StrUtil.equals(loanTime, BaseTypeInfoEnum.LoanTime.lt001.getValue())) {
            return 3;
        } else if (StrUtil.equals(loanTime, BaseTypeInfoEnum.LoanTime.lt002.getValue())) {
            return 6;
        } else if (StrUtil.equals(loanTime, BaseTypeInfoEnum.LoanTime.lt003.getValue())) {
            return 12;
        }
        return 36;
    }


    //职业身份
    public static Integer getJob(String jbo) {
        if (StrUtil.equals(jbo, BaseTypeInfoEnum.Gongzuo.gz004.getValue())) {
            return 2;
        }else  if (StrUtil.equals(jbo, BaseTypeInfoEnum.Gongzuo.gz001.getValue())) {
            return 1;
        }else  if (StrUtil.equals(jbo, BaseTypeInfoEnum.Gongzuo.gz002.getValue())) {
            return 3;
        }
        return 5;
    }

    //芝麻
    public static Integer getZhima(String zhima) {
        if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm001.getValue())) {
            return 1;
        } else if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm002.getValue())) {
            return 2;
        } else if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm003.getValue())) {
            return 3;
        }else if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm004.getValue())) {
            return 4;
        }
        return 5;
    }

    //信用卡
    public static Integer getXinYongKa(String xinYongKa){
        if(StrUtil.equals(xinYongKa,BaseTypeInfoEnum.XinYongKa.xyk001.getValue())){
            return 1;
        }
        return 2;
    }

}
